home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1996 February / macformat-034.iso / mac / Shareware City / Developers / appe Windows 2.03 / aevents.c < prev    next >
Encoding:
Text File  |  1995-12-16  |  2.0 KB  |  62 lines  |  [TEXT/CWIE]

  1. // File "aevents.c" -
  2.  
  3. #include "aevents.h"
  4. #include "main.h"
  5. #include "sample win.h"
  6.  
  7. // ***********************************************************************************
  8. // Global Declarations 
  9.  
  10. extern GlobalsRec glob;
  11.  
  12. // ***********************************************************************************
  13. // ***********************************************************************************
  14.  
  15. pascal short AEHandlerOAPP(AppleEvent *event, AppleEvent *reply, long refCon) {
  16.  
  17.     return(0);
  18.     }
  19.     
  20. // ***********************************************************************************
  21. // ***********************************************************************************
  22.  
  23. pascal short AEHandlerODOC(AppleEvent *event, AppleEvent *reply, long refCon) {
  24.     
  25.     return(0);
  26.     }
  27.     
  28. // ***********************************************************************************
  29. // ***********************************************************************************
  30.  
  31. pascal short AEHandlerPDOC(AppleEvent *event, AppleEvent *reply, long refCon) {
  32.  
  33.     return(0);    
  34.     }
  35.     
  36. // ***********************************************************************************
  37. // ***********************************************************************************
  38.  
  39. pascal short AEHandlerQUIT(AppleEvent *event, AppleEvent *reply, long refCon) {
  40.  
  41.     glob.quitting = TRUE;
  42.     return(0);
  43.     }
  44.     
  45. // ***********************************************************************************
  46. // ***********************************************************************************
  47.  
  48. void InitHLEvents() {
  49.     short i, err=0;
  50.     
  51.     err=AEInstallEventHandler(kCoreEventClass, kAEOpenApplication, 
  52.             NewAEEventHandlerProc(AEHandlerOAPP), 0, 0);
  53.     err=AEInstallEventHandler(kCoreEventClass, kAEOpenDocuments, 
  54.             NewAEEventHandlerProc(AEHandlerODOC), 0, 0);
  55.     err=AEInstallEventHandler(kCoreEventClass, kAEPrintDocuments, 
  56.             NewAEEventHandlerProc(AEHandlerPDOC), 0, 0);
  57.     err=AEInstallEventHandler(kCoreEventClass, kAEQuitApplication, 
  58.             NewAEEventHandlerProc(AEHandlerQUIT), 0, 0);
  59.     }
  60.  
  61.  
  62.